home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS073.dsk
/
DISK SPACE 16.int
< prev
next >
Wrap
Text File
|
2012-02-16
|
5KB
|
172 lines
10 REM ***************************
20 REM * *
30 REM * DISK SPACE 16 *
40 REM * *
50 REM * BY LAWRENCE GUST *
60 REM * *
70 REM * 12/3/80 VERSION 1.1 *
80 REM * *
90 REM ***************************
100 REM 3086,3087,3094
110 PRINT "<CTRL-D> BLOAD DISK SPACE 16.X": POKE 3086,17: POKE 3087,0: POKE 3094,1
120 POKE 3090,0: POKE 3091,32
130 DIM A$(10),B$(20)
140 GOSUB 840
150 CALL -936:VTAB 12:PRINT "INSERT DISK AND HIT RETURN":INPUT A$
160 CALL 3072
170 CALL -936
180 L=8192+(3*16)+8
190 VTAB 1:TAB 4:PRINT " 1111111111222222222233333"
200 VTAB 2:TAB 4:PRINT "01234567890123456789012345678901234"
210 FOR S=0 TO 15:VTAB (S+4):TAB 1:PRINT S:NEXT S
220 FOR A=0 TO 34
230 SF8= PEEK (L):S70= PEEK (L+1)
240 H=A+4
250 B15=(SF8>127)
260 IF B15 THEN SF8=SF8-128
270 B14=(SF8>63)
280 IF B14 THEN SF8=SF8-64
290 B13=(SF8>31)
300 IF B13 THEN SF8=SF8-32
310 B12=(SF8>15)
320 IF B12 THEN SF8=SF8-16
330 B11=(SF8>7)
340 IF B11 THEN SF8=SF8-8
350 B10=(SF8>3)
360 IF B10 THEN SF8=SF8-4
370 B9=(SF8>1)
380 IF B9 THEN SF8=SF8-2
390 B8=SF8
400 B7=(S70>127)
410 IF B7 THEN S70=S70-128
420 B6=(S70>63)
430 IF B6 THEN S70=S70-64
440 B5=(S70>31)
450 IF B5 THEN S70=S70-32
460 B4=(S70>15)
470 IF B4 THEN S70=S70-16
480 B3=(S70>7)
490 IF B3 THEN S70=S70-8
500 B2=(S70>3)
510 IF B2 THEN S70=S70-4
520 B1=(S70>1)
530 IF B1 THEN S70=S70-2
540 B0=S70
550 VTAB 4:TAB H:F=B0:GOSUB 780
560 VTAB 5:TAB H:F=B1:GOSUB 780
570 VTAB 6:TAB H:F=B2:GOSUB 780
580 VTAB 7:TAB H:F=B3:GOSUB 780
590 VTAB 8:TAB H:F=B4:GOSUB 780
600 VTAB 9:TAB H:F=B5:GOSUB 780
610 VTAB 10:TAB H:F=B6:GOSUB 780
620 VTAB 11:TAB H:F=B7:GOSUB 780
630 VTAB 12:TAB H:F=B8:GOSUB 780
640 VTAB 13:TAB H:F=B9:GOSUB 780
650 VTAB 14:TAB H:F=B10:GOSUB 780
660 VTAB 15:TAB H:F=B11:GOSUB 780
670 VTAB 16:TAB H:F=B12:GOSUB 780
680 VTAB 17:TAB H:F=B13:GOSUB 780
690 VTAB 18:TAB H:F=B14:GOSUB 780
700 VTAB 19:TAB H:F=B15:GOSUB 780
710 L=L+4:NEXT A
720 VTAB 21:TAB 11:PRINT "FREE SECTORS = ";FR
730 FR=0
740 PRINT :INPUT "AGAIN?",A$
750 IF A$="Y" OR A$="YES" THEN 150
760 CALL -936
770 END
780 IF F=0 THEN POKE 50,63
790 IF F=0 THEN PRINT "*"
800 IF F=1 THEN PRINT "'"
810 POKE 50,255
820 IF F=1 THEN FR=FR+1
830 RETURN
840 CALL -936
850 B$="DISK SPACE 16":GOSUB 1130
860 B$="BY LAWRENCE GUST":GOSUB 1130
870 CALL -936:PRINT " INSTRUCTIONS:"
880 PRINT :PRINT :PRINT
890 PRINT "THIS PROGRAM WILL SHOW YOU, WITH THE"
900 PRINT
910 PRINT "USE OF A CHART, EXACTLY HOW MUCH ROOM"
920 PRINT
930 PRINT "(AND WHERE IT IS) YOU HAVE ON YOUR"
940 PRINT
950 PRINT "MINI-DISK."
960 PRINT
970 PRINT :PRINT "THE DISK YOU WISH TO READ MUST"
980 PRINT
990 PRINT "BE IN DRIVE 1. THE SLOT YOUR"
1000 PRINT :PRINT "DISK CONTROLLER BOARD IS PLUGGED IN"
1010 PRINT :PRINT "MUST BE SLOT 6."
1020 VTAB 23:PRINT "HIT RETURN WHEN READY":INPUT "",A$:CALL -936
1030 PRINT "****************************************":PRINT
1040 PRINT :PRINT " YOU MUST HAVE THE 16 SECTOR PROMS ON "
1050 PRINT :PRINT " YOUR DISK CONTROLLER BOARD<CTRL-G>!"
1060 PRINT :PRINT :PRINT "****************************************"
1070 PRINT :PRINT :PRINT "IF YOU WISH TO EXIT THIS PROGRAM NOW,"
1080 PRINT :PRINT "TYPE 'EXIT'. TO CONTINUE, TYPE"
1090 PRINT :PRINT "ANYTHING ELSE (OR HIT RETURN)"
1100 PRINT
1110 INPUT A$:IF A$="EXIT" THEN 770
1120 RETURN
1130 CALL -936
1140 VTAB 12:TAB 20- LEN(B$)/2:PRINT B$
1150 FOR A=1 TO 2000:NEXT A:RETURN
1160 REM
1170 REM PROGRAM LOGIC IS AS FOLLOWS
1180 REM ON TRACK 17, SECTOR 15 THE
1190 REM SECTOR USED LIST IS HIDDEN.
1200 REM THE EXACT FORMAT IS GIVEN
1210 REM IN THE DOS MANUAL. TWO
1220 REM BYTES REPRESENT THE 16
1230 REM SECTORS PER TRACK. A 1
1240 REM INDICATES AN OPEN SECTOR.
1250 REM EVERY TIME DOS WANTS TO
1260 REM WRITE TO THE DISK IT LOOKS
1270 REM HERE TO FIND AN EMPTY
1280 REM SECTOR.
1290 REM
1300 REM A SHORT BINARY FILE IS
1310 REM LOADED INTO MEMORY IN LINE
1320 REM 110. THIS MACHINE LANGUAGE
1330 REM SUBROUTINE, STARTING AT
1340 REM $0C00 (HEX, OR 3072
1350 REM DECIMAL) USES A PART OF
1360 REM DOS TO READ THE ABOVE
1370 REM SECTOR.
1380 REM
1390 REM IN LINES 150 AND 160, THE
1400 REM PROGRAM PROMPTS THE USER
1410 REM TO INSERT A DISK INTO THE
1420 REM DRIVE. A SIMPLE CALL 3072
1430 REM LOADS THE SECTOR INTO THE
1440 REM MEMORY STARTING AT $2000
1450 REM (HEX, OR 8192 DECIMAL)
1460 REM
1470 REM THE INFORMATION ON THIS
1480 REM SECTOR IS PUT ON HI-RES
1490 REM PAGE 1.
1500 REM
1510 REM LINES 190 THRU 210 SET UP
1520 REM THE SCREEN.
1530 REM
1540 REM STARTING IN LINE 220 A LOOP
1550 REM IS SET UP TO READ THE DATA
1560 REM OFF OF THE HI-RES PAGE AND
1570 REM DE-CODE IT. THIS METHOD
1580 REM IS PROBABLY NOT THE FASTEST
1590 REM NOR THE MOST EFFICENT, BUT
1600 REM DID THE JOB WITH A MINIMUM
1610 REM OF THINKING.
1620 REM
1630 REM AS THE DATA IS DECODED, IT
1640 REM IS SHOWN ON THE SCREEN.
1650 REM A FULL (OCCUPIED) SECTOR
1660 REM IS SHOWN AS AN INVERSE "*"
1670 REM AND AN EMPTY (OPEN) SECTOR
1680 REM IS SHOWN AS A NORMAL "'"